home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / INFO / XFDISK.ZIP / DOSCOMP.TIP < prev    next >
Text File  |  1991-08-29  |  1KB  |  26 lines

  1. If you use the DOS COMP command and watch as the screen scrolls.  You may not
  2. always be able to read the message about the compare.  Try the following:
  3.  
  4.  
  5. 1st issue the command:  DIR [data1]
  6.  
  7.   At the end of the directory listing will be a count of the number of files
  8.   matching [data1].  If [data1] is [*.*] and the directory is NOT a
  9.   root directory, subtract 2 from the count.  This is because the ".." and "."
  10.   subdirectory entries are not counted during the next step.  If the directory
  11.   contains additional subdirectory entries, they must also be subtracted from
  12.   the count to get the number of actual files in the directory.
  13.  
  14.  
  15. 2nd issue the command:  COMP [data1] [data2] | FIND /C "OK"
  16.  
  17.   The compare is filtered through FIND which will look for the string "OK".
  18.   The /C switch instructs FIND to keep a count of the number of files that
  19.   compare "OK".  The "OK" must be upper case.  At the end of the compare, you
  20.   will be prompted for comparing more files.  Answer N and the count for the
  21.   number of "OK" files will be shown.
  22.  
  23.                                                    Dennis W. Person
  24.                                                    6828 Devonshire Drive
  25.                                                    Canton, MI  48187-2613
  26.